package com.ruan.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @ClassName:LoginDto
 * @Author:阮昇
 * @Description: 登陆接口接收数据
 * @Datetime: 2023/9/21 23:18
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class LoginDto {
    @ApiModelProperty(value = "用户名（邮箱号）")
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "用户名必须是有效的邮箱地址")
    private String username;
    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;
    @ApiModelProperty(value = "行为验证码")
    @NotBlank(message = "验证不能为空")
    private String captchaVerification;
}
